<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test about jquery.dc.js</title>
<link rel="stylesheet" type="text/css" href="../css/mqueue.css" />
<link rel="stylesheet" type="text/css" href="../css/font-awesome.css" />
<style>
    .btns button {
    display: block;
    }
</style>
</head>
<body class="dc-on">
<div id="test1">
	<div class="btns">
		<button class="load-click" data-dtype="JSON" data-target=".test2" data-url="/dc/services/services.php" data-dopost="test2">Submit is use to dc and show it from response message</button>
		<br/>
		<button onclick="jsonp()">Jsonp test</button>
	</div>
</div>
<div id="test2">
	<div style="width: 300px; height:300px;" class="load-auto" data-target=".test" data-url="/dc/services/services.php">
	    <div class="test">
	    </div>
	</div>
</div>
<div id="test3" class="cascade-load-auto" data-url="../services/file_type.json" data-target="#test3">
    <select data-cascade-layer="1" data-cascade-default="rich">
        <option value="first">first</option>
        <option value="second">second</option>
    </select>
    <select data-cascade-layer="2" data-cascade-default="docx">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
    </select>
    <select data-cascade-layer="3">
        <option value="a">a</option>
        <option value="b">b</option>
        <option value="c">c</option>
    </select>
</div>
<div class="test2">
	status: <input type="text" data-json="status" /><br />
	title: <input type="text" data-json="title" /><br />
	msg: <input type="text" data-json="text" /><br />
	url: <input type="text" data-json="url" /><br />
	img: <input type="text" data-json="img" /><br />
	ather: <img data-json="img" data-json-target="src" />
</div>
</body>
<script src="http://libs.baidu.com/jquery/1.10.2/jquery.js"></script>
<script src="../js/jquery.dc.js"></script>
<script>
$(function() {
	// $('#test1').dc({ajax_url_skip : false, ajax_animate: false}).ajax_bind();
	// $('#test2').dc({ajax_url_skip : false}).ajax_bind();
    //$('#test3').dc({cascade_hide_empty: false}).cascade_load();
});
function jsonp() {
	$.ajax({
		url: '/dc/services/services.php',
		dataType: 'jsonp',
		cache: false,
		type: 'GET',
		data: { 'dopost' : 'test3' },
		success: function(res) {
			alert(res);
		}
	})
}
</script>
</html>















